<template>
	<view>
		<view>选择要评测的</view>
		<view v-for="(item,index) in questionaire" @click="Questionnaires(item.questionaireId)">
			<view class="my-content__list" >
				<view class="my-content__list-title">
				评测:{{item.questionnaireName}}
				</view>
			</view>
		</view>
		<view @click="loginhistory">查看历史评测</view>
	</view>
</template>

<script>
	export default {
	  data(){
	    return {
			gouxSta:false,
			times:60,
			yzmbotshou:true,
			yzmbothide:false,
			UserVo:{
				questionnaireName:''
			},
			questionaire:[]
		}
		   },
	   onLoad(){
		   this.QuestionnaireSelect()
	    },
	   methods:{
		   loginhistory(){
			 uni.navigateTo({
			 	url:"../history/index"
			 })  
		   },
		   Questionnaires(row){
			   console.log(row)
			   uni.navigateTo({
			   	url:"../means/index?questionaireId="+row
			   })
		   },
			QuestionnaireSelect(){
				console.log(this.UserVo)	
				uni.request({
				    url: `http://localhost:7000/review/QuestionnaireSelect`, //接口地址。
				    data: this.UserVo,
				    header: {
				        'custom-header': 'hello' //自定义请求头信息
				    },
					method:'POST',
				    success: (res) => {
						console.log(res.data)
						this.questionaire=res.data.data
				    }
				});	
			},
	    }
	}
</script>

<style>
	.my-content__list{
		display: flex;
		justify-content: space-between;
		padding: 15px;
		margin-bottom: 10px;
		background-color: #FFFFFF;
		color: #333;
		font-size: 14px;
	}
</style>
